#include "conn.hpp"

int main(){
    StringUtil::UrlParam params;
    MYSQL* conn;
    Init(params,conn); 

    //根据业务需要进行计算
    string topic = params["topic"];
    string title = params["title"];
    string author = params["author"];
    string content = params["content"];

    stringstream ss;
    string output;
    int topicid = OperateTopic::IdOfTopic(conn,topic);
    OperateNews::AddNews(conn,topicid,title,author,content);
    Action::ActionAdmin(conn,output);
    
    ss << output;
    HttpResponse(ss.str());
    return 0;
}
